package net.uri;

import java.io.BufferedInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.net.Authenticator;
import java.net.URL;

public class SecureSourceViewer
{
	public static void main(String[] args)
	{
		Authenticator.setDefault(new DialogAuthenticator());
		for (int i = 0; i < args.length; i++)
		{
			try
			{
				URL u = new URL(args[0]);
				InputStream in = u.openStream();
				in = new BufferedInputStream(in);
				Reader r = new InputStreamReader(in);
				int c;
				while((c=r.read())!=-1)
				{
					System.out.print((char)c);
				}
			}
			catch (Exception e)
			{
				
			}
		}
		System.exit(0);
	}
}
